/******************************************************************************
 * * mmi_modem_adaptor_ps.h - data structure for mmi-modem adpator, packet domain sub-module
 *
 * *(C) Copyright 2019 Asr International Ltd.
 * * All Rights Reserved
 * ******************************************************************************/
#ifndef MMI_MODEM_ADAPTOR_PS_H
#define MMI_MODEM_ADAPTOR_PS_H

#ifdef __cplusplus
extern "C" {
#endif

#include "mmi_modem_adaptor_main.h"


#define MAX_APN_INFO_LEN 99

typedef void (*SwitchSimDoneCb)(UINT8);

typedef enum {
    CM_SIM_0,
    CM_SIM_1,
    NUM_OF_CM_SIM
}CMSimID;

typedef enum {
    APN_MODE_MANUAL = 0,
    APN_MODE_AUTO
}eApnMode;

enum {
    CM_IPTYPE_IPV4V6,
    CM_IPTYPE_IP,
    CM_IPTYPE_IPV6,
};

typedef struct {
    char apn[MAX_APN_INFO_LEN];
    /* 1-15 */
    UINT8 cid;
    UINT8 ipType;
    /**
    * isDefault 1: will modify LTE attach APN when call CM_SetPdpState to active the PDP context,
    * the cid value should only set to 1, specify other value will return error
    * 0: will create a new PDP context with cid
    */
    UINT8 isDefault;
} ApnInfo_s;

extern INT32 CM_SetMasterSimID(CMSimID simID, SwitchSimDoneCb cb);
extern INT32 CM_SetConnectionSwitch(BOOL onOff);
extern BOOL CM_GetConnectionSwitch(void);
extern int CM_SetupDefaultConnection(void);
#ifndef USE_LV_INTERPHONE_DEMO
extern INT32 CM_ConfigApnInfo(ApnInfo_s *info);
extern INT32 CM_SetupDataCall(UINT8 cid);
#endif
extern INT32 CM_DeactiveDataCallAll(void);
extern void setAutoApn(UINT8 mode, BOOL persist);

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /*MMI_MODEM_ADAPTOR_PS_H*/
